<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "store".
 *
 * @property int $id
 * @property int $type
 * @property string $name
 * @property string $address
 * @property string $street
 * @property string $longitude 经度
 * @property string $latitude 纬度
 */
class Store extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'store';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['type', 'name', 'address', 'street', 'longitude', 'latitude'], 'required'],
            [['type'], 'integer'],
            [['name', 'address', 'longitude', 'latitude'], 'string', 'max' => 32],
            [['street'], 'string', 'max' => 64],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'type' => 'Type',
            'name' => 'Name',
            'address' => 'Address',
            'street' => 'Street',
            'longitude' => 'Longitude',
            'latitude' => 'Latitude',
        ];
    }
}
